No title
xib添加手势后报错:-[UITapGestureRecognizer setFrame:]: unrecognized selector sent to instance xxx…
主要原因如下:
1 | (instancetype)mineHeaderView |
添加手势后, 以上的创建对象方法就不可以通过lastObject来获取了, 因为获取到的是最后添加的手势对象, 所以才会出现这个错误
解决方法:
将lastObject改为firstObject即可..
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.